/*
 * Copyright (c) 2014 laidian. All Rights Reserved.
 * 
 * @author yaoyuming
 * 
 * @date 2020-03-24 15:35
 */
package com.yao.home;

import cn.hutool.core.lang.Console;
import com.yao.fin.service.FinancialTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 全场入口类。前端跳转控制器
 * 
 * @author yaoyuming
 * @date 2020/03/12 17:12
 */
@Controller
@RequestMapping("/home")
public class HomeController {

    @Autowired
    private FinancialTemplateService financialTemplateService;

    /**
     * 功能描述 : 测试接口
     * 
     * @author yaoyuming
     * @date 2020/3/24
     * @return {@link }
     */
    @GetMapping("/index")
    public String index() {
        return "index";
    }

    /**
     * 功能描述 : 定位前端页面
     *
     * @param path
     * @author yaoyuming
     * @date 2020/3/19
     * @return {@link String}
     */
    @GetMapping("/{redirect}")
    public String test(@PathVariable("redirect") String path) {
        Console.log("path = {}", path);
        return path;
    }

    @GetMapping("/{first}/{redirect}")
    public String mulitRedir(@PathVariable("first") String first, @PathVariable("redirect") String path) {
        Console.log("first = {} ;; path = {}", first, path);
        return first + "/" + path;
    }
}